
function getPage()
{
    let page,leftPage,total,rightPage;
    page=$("[class='page-item active ']").children().eq(0).text()
    get_with_data("http://"+ip+"/user/student/page",{
        page: page,
        pageSize:7
    },function (data)
    {
      total=  data.t.total
        leftPage=page-3;
      if (leftPage<1)
      {
          leftPage=1;
      }
      rightPage=page+3;
      if(rightPage>total)
      {
          rightPage=total;
      }
      if(rightPage)
        var li=$("#active").clone(true)
        var select_right=$("#select-right").clone(true)
        $("#active").remove()
        $("#select-right").remove()
        li.attr("id","")
        li.attr('class','page-item');

      for(let i=leftPage;i<=rightPage;i++)
      {
         var li1=li.clone(true);
          if (i==page)
          {
              li1.attr('class','page-item active ');
          }

          li1.children().eq(0).text(i);
          console.log(li1.children().eq(0).text())
        $("#page-select").append(li1)
      }
        $("#page-select").append(select_right)
   $("#chat_tr").show();
        $.each(data.t.records,function (a,b){
            var tr=$("#chat_tr").clone(true)
     tr.attr('id','chat_tr'+a);
            tr.children().eq(0).text(b.sid)
            tr.children().eq(1).children().eq(0).children().eq(0).attr('src',b.avatarPath)
            tr.children().eq(2).text(b.name)
            if(b.onlineStatus==0)
            {
                tr.children().eq(3).children().text("离线")
                tr.children().eq(3).children().attr('class','mb-0 badge badge-danger')
            }
            else
            {
                tr.children().eq(3).children().text("在线")
                tr.children().eq(3).children().attr('class','mb-0 badge badge-success')
            }
            tr.children().eq(5).text(b.uid)
            $("#chat_tb").append(tr)
        })
        $("#chat_tr").hide();

    }
    )
}

function a()
{
    console.log($("[class='page-item active ']").children().eq(0).text());
}